﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace DEMO.Web_APP
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            IEnumerable<DEMO.WCF_API.Contracts.Employee> employees
                = (IEnumerable<DEMO.WCF_API.Contracts.Employee>)DEMO.BusinessLogicLayer.WCF_Util<DEMO.WCF_API.Contracts.IEmployee>
                .CallService("http://10.112.201.96/DEMO.WCF/employee.svc/", "getEmployees", null, new System.ServiceModel.BasicHttpBinding());
            foreach (var item in employees)
            {
                Response.Write(item.Email + "<hr/>");
            }

             DEMO.WCF_API.Contracts.Employee oEmployee
                = (DEMO.WCF_API.Contracts.Employee)DEMO.BusinessLogicLayer.WCF_Util<DEMO.WCF_API.Contracts.IEmployee>
                .CallService("http://10.112.201.96/DEMO.WCF/employee.svc/", "getEmployeeById", new object[]{5}, new System.ServiceModel.BasicHttpBinding());

             Response.Write(oEmployee.Email + "<hr/>");
            
            
        }
    }
}